package io.hugetower.modules.pest.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.hugetower.common.utils.PageUtils;
import io.hugetower.common.utils.Query;

import io.hugetower.modules.pest.dao.CropTypeDao;
import io.hugetower.modules.pest.entity.CropTypeEntity;
import io.hugetower.modules.pest.service.CropTypeService;


@Service("cropTypeService")
public class CropTypeServiceImpl extends ServiceImpl<CropTypeDao, CropTypeEntity> implements CropTypeService {

    @Override
    public PageUtils queryPage(Map<String, Object> params, CropTypeEntity cropTypeEntity) {
        IPage<CropTypeEntity> page = this.page(
                new Query<CropTypeEntity>().getPage(params),
                new QueryWrapper<CropTypeEntity>()
        );

        return new PageUtils(page);
    }

}